package com.dcbdemo.springbootvuedemo.mapper;

import com.dcbdemo.springbootvuedemo.domain.User;
import org.apache.ibatis.annotations.Param;
import org.springframework.stereotype.Repository;

import java.util.List;

@Repository
public interface UserDao {
    //分页查询用户
    public List<User> getAllUser(@Param("username") String username, @Param("pageStart") int pageStart, @Param("pageSize") int pageSize);
    //获取用户总数个数
    public int getUserCounts(@Param("username") String username);
    //修改状态码
    public int updateUserState(@Param("id") Integer id,@Param("state") Boolean state);
    //添加用户
    public int addUser(User user);
    //删除用户
    public int deleteUser(@Param("id") Integer id);

    public User getUpdateUser(int id);
    public int editUser(User user);
}
